﻿// ***********************************************************************
// Project			: Micua
// Assembly         : Micua.Model
// Author           : iceStone
// Created          : 2013-11-23 12:08
//
// Last Modified By : iceStone
// Last Modified On : 2014-01-12 16:18
// ***********************************************************************
// <copyright file="MicuaModel.Context.cs" company="Wedn.Net">
//     Copyright (c) Wedn.Net. All rights reserved.
// </copyright>
// <summary>Micua数据库上下文</summary>
// ***********************************************************************

namespace Micua.Model
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;
    using Micua.Utility;
    
    /// <summary>
    /// Class MicuaModelContainer.
    /// </summary>
    /// <remarks>
    ///  2013年11月19日 18:08 Created By iceStone
    /// </remarks>
    public partial class MicuaModelContainer : DbContext
    {
    	/// <summary>
        /// Initializes a new instance of the <see cref="MicuaModelContainer"/> class.
        /// </summary>
        /// <remarks>
        ///  2013年11月19日 18:06 Created By iceStone
        /// </remarks>
        public MicuaModelContainer() : base(ConfigHelper.GetString(ConfigHelper.GetString("ConnStr")))
        {
        }
    	/// <summary>
        /// 在完成对派生上下文的模型的初始化后，并在该模型已锁定并用于初始化上下文之前，将调用此方法。虽然此方法的默认实现不执行任何操作，但可在派生类中重写此方法，这样便能在锁定模型之前对其进行进一步的配置。
        /// </summary>
        /// <remarks>
        ///  2013-11-23 12:19 Created By iceStone
        /// </remarks>
        /// <param name="modelBuilder">定义要创建的上下文的模型的生成器。</param>
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
                }
    
    	/// <summary>
    	/// Gets or sets the 发表物.
    	/// </summary>
    	/// <value>The 发表物.</value>
        public virtual DbSet<Post> Posts { get; set; }
    	/// <summary>
    	/// Gets or sets the 发表物元数据.
    	/// </summary>
    	/// <value>The 发表物元数据.</value>
        public virtual DbSet<PostMeta> PostMetas { get; set; }
    	/// <summary>
    	/// Gets or sets the 用户.
    	/// </summary>
    	/// <value>The 用户.</value>
        public virtual DbSet<User> Users { get; set; }
    	/// <summary>
    	/// Gets or sets the 用户元数据.
    	/// </summary>
    	/// <value>The 用户元数据.</value>
        public virtual DbSet<UserMeta> UserMetas { get; set; }
    	/// <summary>
    	/// Gets or sets the 系统配置选项.
    	/// </summary>
    	/// <value>The 系统配置选项.</value>
        public virtual DbSet<Option> Options { get; set; }
    	/// <summary>
    	/// Gets or sets the 标签.
    	/// </summary>
    	/// <value>The 标签.</value>
        public virtual DbSet<Tag> Tags { get; set; }
    	/// <summary>
    	/// Gets or sets the 分类.
    	/// </summary>
    	/// <value>The 分类.</value>
        public virtual DbSet<Category> Categorys { get; set; }
    	/// <summary>
    	/// Gets or sets the 链接.
    	/// </summary>
    	/// <value>The 链接.</value>
        public virtual DbSet<Link> Links { get; set; }
    	/// <summary>
    	/// Gets or sets the 评论.
    	/// </summary>
    	/// <value>The 评论.</value>
        public virtual DbSet<Comment> Comments { get; set; }
    	/// <summary>
    	/// Gets or sets the 评论元数据.
    	/// </summary>
    	/// <value>The 评论元数据.</value>
        public virtual DbSet<CommentMeta> CommentMetas { get; set; }
    }
}
